<template>
  <a-config-provider :get-popup-container="getPopupContainer" :locale="zhCN">
    <div class="flex shadow p-4 justify-center">
      <a-button type="link">
        <router-link to="/">Home</router-link>
      </a-button>
      <a-button type="link">
        <router-link to="/about">About</router-link>
      </a-button>
    </div>
    <router-view class="mt-4" />
  </a-config-provider>
</template>

<script setup>
  import zhCN from 'ant-design-vue/es/locale/zh_CN';
  import dayjs from 'dayjs';
  import 'dayjs/locale/zh-cn';

  dayjs.locale('en');

  function getPopupContainer(el, dialogContext) {
    if (dialogContext) {
      return dialogContext.getDialogWrap();
    } else {
      return document.body;
    }
  }
</script>

<style lang="less"></style>
